package com.example;


import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;

@WebListener
public class MyServletContextListener implements ServletContextListener {
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ServletContext 对象初始化了");
    }
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ServletContext 对象销毁了");
    }
}
